import axios from "axios"

// 登录的路由
export function post_login(data){
    return axios.post("/user/login/", data);
}

// # 图片验证码的路由
export function get_url(data){
    return axios.get("/user/image/" + data);
}

//菜单
export function get_menu(){
    return axios.get("/home/menus/");
}

// # 用户信息
export function get_all_user(){
    return axios.get("/user/users");
}

export function get_one_user(data){
    return axios.get("/user/user/" + data);
}

export function post_user(data){
    return axios.post("/user/users/",data);
}

export function put_user(data){
    return axios.put("/user/user/" + data);
}

export function del_user(data){
    return axios.delete("/user/user/" + data);
}

// # 学校
export function get_all_school(){
    return axios.get("/user/schools");
}

export function get_one_school(data){
    return axios.get("/user/school/" + data);
}

export function post_school(data){
    return axios.post("/user/schools/",data);
}

export function put_school(id,data){
    return axios.put("/user/school/" + id, data);
}

export function del_school(data){
    return axios.delete("/user/school/" + data);
}

// # 班级
export function get_all_class(){
    return axios.get("/user/classes");
}

export function get_one_class(data){
    return axios.get("/user/class/" + data);
}

export function post_class(data){
    return axios.post("/user/classes/",data);
}

export function put_class(id,data){
    return axios.put("/user/class/" + id, data);
}

export function del_class(data){
    return axios.delete("/user/class/" + data);
}

// # 学生
export function get_all_student(){
    return axios.get("/user/students");
}

export function get_one_student(data){
    return axios.get("/user/student/" + data);
}

export function post_student(data){
    return axios.post("/user/students/",data);
}

export function put_student(id,data){
    return axios.put("/user/student/" + id, data);
}

export function del_student(data){
    return axios.delete("/user/student/" + data);
}

// # 老师
export function get_all_teacher(){
    return axios.get("/user/teachers");
}

export function get_one_teacher(data){
    return axios.get("/user/teacher/" + data);
}

export function post_teacher(data){
    return axios.post("/user/teachers/",data);
}

export function put_teacher(id,data){
    return axios.put("/user/teacher/" + id, data);
}

export function del_teacher(data){
    return axios.delete("/user/teacher/" + data);
}

// # 获取所有类别
export function get_lassifys(data){
    return axios.get("/learning/lassifys/" + data);
}

// # 获取所有标签
export function get_lables(data){
    return axios.get("/learning/lables/" + data);
}

// # 学习内容
export function get_all_content(){
    return axios.get("/learning/contents");
}

export function get_one_content(data){
    return axios.get("/learning/content/" + data);
}

export function post_content(data){
    return axios.post("/learning/contents/",data);
}

export function put_content(id,data){
    return axios.put("/learning/content/" + id, data);
}

export function del_content(data){
    return axios.delete("/learning/content/" + data);
}

// # 学习任务learnings
export function get_all_learning(){
    return axios.get("/learning/learnings");
}

export function get_one_learning(data){
    return axios.get("/learning/learning/" + data);
}

export function post_learning(data){
    return axios.post("/learning/learnings/",data);
}

export function put_learning(id,data){
    return axios.put("/learning/learning/" + id, data);
}

export function del_learning(data){
    return axios.delete("/learning/learning/" + data);
}

// # 学习资料materials
export function get_all_materila(){
    return axios.get("/learning/materilas/");
}

export function get_one_materila(data){
    return axios.get("/learning/materila/" + data);
}

export function post_materila(data){
    return axios.post("/learning/materilas/",data);
}

export function put_materila(id,data){
    return axios.put("/learning/materila/" + id, data);
}

export function del_materila(data){
    return axios.delete("/learning/materila/" + data);
}

// # 问候语
export function get_greetings(){
    return axios.get("/learning/greetings/");
}

// # 点赞
export function post_easylike(data){
    return axios.post("/learning/easylike/", data);
}

// # 收藏
export function post_collect(data){
    return axios.post("/learning/collect/", data);
}
